﻿using Common.Prism.Services;
using Prism.Events;
using Prism.Ioc;

namespace Common.Prism.Apps
{
    public class Global
    {

        /// <summary>
        /// IOC 实例
        /// </summary>
        public static IContainerProvider Container { get; set; }


        /// <summary>
        /// 事件分发实例
        /// </summary>
        public static IEventAggregator EventAggregator
        {
            get
            {
                return Container.Resolve<IEventAggregator>();
            }
        }

        /// <summary>
        /// 窗口管理器
        /// </summary>
        public static WindowsProviderService WindowService
        {
            get
            {
                return Container.Resolve<WindowsProviderService>();
            }
        }
    }
}
